import java.awt.*;

public class level {
	public int x, y;
	public int posButtonID = 99;
	public Font font1 = new Font("Helvetica", Font.PLAIN, 20);
	public boolean clicked = false;
	public int level = 1;
	public int item = 2;

	public void drawObjects(Graphics g) {

		item = 2;
		posButtonID = 99;
		g.setFont(font1);
		g.setColor(Color.DARK_GRAY);
		g.fillRect(0, 0, 800, 600);

		if ((x >= 300 && y >= 70) && (x <= 500 && y <= 125)) {

			posButtonID = 1;
			if (clicked) {
				level = 1;

			}
		}
		if ((x >= 300 && y >= 170) && (x <= 500 && y <= 225)) {

			posButtonID = 2;
			if (clicked) {
				level = 2;

			}
		}
		if ((x >= 300 && y >= 270) && (x <= 500 && y <= 325)) {

			posButtonID = 3;
			if (clicked) {
				level = 3;

			}
		}
		if ((x >= 300 && y >= 370) && (x <= 500 && y <= 425)) {

			posButtonID = 4;
			if (clicked) {
				level = 4;

			}
		}
		// -------------------------- zurück
		if ((x >= 300 && y >= 520) && (x <= 500 && y <= 575)) {

			posButtonID = 0;
			if (clicked) {
				item = 0;

			}
		}
		if (posButtonID == 0) {
			g.setColor(Color.CYAN);
		} else {
			g.setColor(Color.RED);
		}
		g.drawRect(300, 500, 200, 50);
		g.drawRect(305, 500 + 5, 190, 40);
		g.drawString("Zurueck", 358, 533);
		g.setColor(Color.RED);
		// ------------------------------- / zurück

		if (level == 1) {

			g.setColor(Color.orange);

		} else {
			if (posButtonID == 1) {
				g.setColor(Color.CYAN);
			} else {
				g.setColor(Color.RED);
			}

		}
		g.drawRect(300, 50, 200, 50);
		g.drawRect(305, 50 + 5, 190, 40);
		g.drawString("Level 1", 358, 83);

		if (level == 2) {

			g.setColor(Color.orange);

		} else {
			if (posButtonID == 2) {
				g.setColor(Color.CYAN);
			} else {
				g.setColor(Color.RED);
			}

		}
		g.drawRect(300, 150, 200, 50);
		g.drawRect(305, 150 + 5, 190, 40);
		g.drawString("Level 2", 358, 183);

		if (level == 3) {

			g.setColor(Color.orange);

		} else {
			if (posButtonID == 3) {
				g.setColor(Color.CYAN);
			} else {
				g.setColor(Color.RED);
			}

		}
		g.drawRect(300, 250, 200, 50);
		g.drawRect(305, 250 + 5, 190, 40);
		g.drawString("Level 3", 358, 283);

		if (level == 4) {

			g.setColor(Color.orange);

		} else {
			if (posButtonID == 4) {
				g.setColor(Color.CYAN);
			} else {
				g.setColor(Color.RED);
			}

		}
		g.drawRect(300, 350, 200, 50);
		g.drawRect(305, 350 + 5, 190, 40);
		g.drawString("Level 4", 358, 383);

		g.setColor(Color.DARK_GRAY);

	}

}